function f()
    println("f starting...")
    println("f sleep 1...")
    sleep(1)
    println("f sleep 2...")
    sleep(2)
    println("f wake up 2.")
    println("f finished.")
end

 function g()
    println("g starting...")
    println("g sleep 1...")
    sleep(2)
    println("g sleep 2...")
    sleep(0.3)
    println("g wake up 2.")
    println("g finished.")
end

 t1 = Task(f)
 t2 = Task(g)

 schedule(t1)
 schedule(t2)

 # yield()

 read(stdin, Char)